/**
 * @description 通告数据模型
 * @author 756370340
 */

const seq = require('../seq')
const {
    INTEGER,
    STRING,
    TEXT,
    BIGINT
} = require('../types')

const Notice = seq.define('notice', {
    userId: {
        type: INTEGER,
        allowNull: false,
        comment: '发布通告的用户Id'
    },
    title: {
        type: STRING,
        allowNull: false,
        comment: '标题'
    },
    content: {
        type: TEXT,
        allowNull: false,
        comment: '详情描述'
    },
    type: {
        type: STRING,
        allowNull: false,
        defaultValue: "全部",
        comment: '通告类型'
    },
    province: {
        type: STRING,
        allowNull: false,
        defaultValue: "全国",
        comment: '省份'
    },
    city: {
        type: STRING,
        allowNull: false,
        defaultValue: "全部",
        comment: '城市'
    },
    phone:{
        type:INTEGER,
        comment:'发布人手机号'
    },
    weChat:{
        type: STRING,
        comment: '发布人微信号'
    },

    createTime:{
        type:BIGINT,
        comment:'发布时间戳'
    },
    activityTime:{
        type: STRING,
        comment:'活动时间'
    },
    status:{
        type:INTEGER,
        defaultValue: 0,
        comment:'1可报名0不可报名'
    }
})

module.exports = Notice